-- steam_airship
-- Created by panyl
-- 地牢格子：蒸汽飞艇

return {
    restoreGrid = function(grid, info)
        if info["action"] then
            grid.steam_machine.dbase:set("action", info["action"]);
        end
        if info.broken then
            grid.broken = info.broken;
        end
    end,

    -- 收集上下文
    collectContext = function(grid)
        return {
            ["machine_id"] = grid.class_id,
            ["broken"]     = grid.broken,
            ["action"]     = grid.steam_machine.dbase:query("action"),
        };
    end,
};
